
// 联合类型
let arr1: (string | number)[] = ["sean", "mingyue", 10];
let arr2: (string | number)[] = ["mortal", "mingyue", 10];

// 简化：如果有多个类型声明都是一样的,可以使用类型别名简化代码
type CustomArray = (number | string)[];

let arr3: CustomArray = ["sean", "mingyue", 10];
let arr4: CustomArray = ["mortal", "mingyue", 10];
